<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 17431
  Date: 2019/5/13
  Time: 1:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>循环</title>
</head>
<body>

<c:forEach begin="1" end="10" var="i" >${i}<br></c:forEach>

<%
List list=new ArrayList();
list.add("aaa");
list.add("bbb");
list.add("ccc");
request.setAttribute("word",list);
%>
<c:forEach items="${word}" varStatus="arr" var="s">

    ${arr.index}${arr.count}${s}
</c:forEach>
</body>
</html>
